package net.xi.dmhome.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import net.xi.dmhome.handler.ListToStringHandler;
import org.apache.ibatis.type.JdbcType;

/**
 * <p>
 * 
 * </p>
 *
 * @author jxhu
 * @since 2021-02-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("dm_article")
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    private String title;

    /**
     * 类型
     */
    private String type;

    /**
     * 标签
     */
    @TableField(jdbcType = JdbcType.VARCHAR,typeHandler = ListToStringHandler.class)
    private List<String> tag;

    /**
     * 作者
     */
    private String author;

    /**
     * 梗概
     */
    private String description;

    /**
     * 内容
     */
    private String content;

    /**
     * 是否转载
     */
    private Integer isreprint;

    /**
     * 图片
     */
    private String image;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createtime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private Date updatetime;

    /**
     * 是否删除
     */
    @TableLogic //逻辑删除
    private Integer isdel;


}
